package com.zjj.until;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
    public static Date stringToDate(String dateString, String  dateFormat)  {
        SimpleDateFormat format = new SimpleDateFormat(dateFormat);
        try {
            return format.parse(dateString);
        }catch (ParseException e) {
            throw new RuntimeException(e);
        }

    }
}
